<template>
  <van-field 
  :name="myItem.propValues[labelIndex].value" 
  :label="myItem.propValues[labelIndex].value"
  :required="myItem.propValues[requiredIndex].value" >
    <template #input>
      <van-radio-group v-model="myItem.propValues[modelIndex].value" direction="horizontal" @change="changeRadioGroup">
        <van-radio name="1">单选框 1</van-radio>
        <van-radio name="2">单选框 2</van-radio>
      </van-radio-group>
    </template>
  </van-field>
</template>
<script>
export default {
    props: {
    myItem: {},
  },
    data() {
        return {
            modelIndex: 0,
            labelIndex: 1,
            requiredIndex: 2,
        }
    },
    methods: {
        changeRadioGroup(val) {
            console.log(this.myItem.propValues[this.labelIndex].value);
            console.log(val);
        }
    },
    
}
</script>